<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>::Happy - DTAC Prepaid Phone::</title>
<META HTTP-EQUIV="imagetoolbar" CONTENT="no">
<link href="${RESOURCE}/css/global.css" rel="stylesheet" type="text/css" />
<link href="${RESOURCE}/css/global-en.css" rel="stylesheet" type="text/css" />
<script src="${RESOURCE}/tha/include/AC_RunActiveContent.js" type="text/javascript"></script>
<script src="${RESOURCE}/scripts/jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="${RESOURCE}/scripts/PageAction.js" type="text/javascript"></script>
<script language=JavaScript>
function printWindow(){
browserVersion = parseInt(navigator.appVersion)
if (browserVersion >= 4) window.print()
}

function trim(s) {
  while (s.length > 0 && s.substring(0,1) == ' ') {
    s = s.substring(1,s.length);
  }

  while (s.length > 0 && s.substring(s.length-1,s.length) == ' ') {
    s = s.substring(0,s.length-1);
  }

  return s;
}

function include(xUrl,xId) {
  var xmlhttp = false;
  /*@cc_on @*/
  /*@if (@_jscript_version >= 5)

  // JScript gives us Conditional compilation, we can cope with old IE versions.
  // and security blocked creation of the objects.
  try {
    xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
   } catch (e) {
      try {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (E) {
        xmlhttp = false;
      }
   }

  /*@end @*/
  if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
    xmlhttp = new XMLHttpRequest();
  }

  xmlhttp.open("GET", xUrl,true);
  xmlhttp.onreadystatechange=function() {
          if (xmlhttp.readyState==4) {
                document.getElementById(xId).innerHTML = xmlhttp.responseText;
          }
  }
  xmlhttp.send(null)
}


// Declaring required variables
var digits = "0123456789";

// non-digit characters which are allowed in phone numbers
var phoneNumberDelimiters = "()- ";

// characters which are allowed in international phone numbers
// (a leading + is OK)
var validWorldPhoneChars = phoneNumberDelimiters + "+";

// Minimum no of digits in an international phone no.
var minDigitsInIPhoneNumber = 10;

function isInteger(s)
{   var i;
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character is number.
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) return false;
    }

    // All characters are numbers.
    return true;
}

function stripCharsInBag(s, bag)
{   var i;
    var returnString = "";

    // Search through string's characters one by one.
    // If character is not in bag, append to returnString.
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character isn't whitespace.
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }

    return returnString;
}

function checkInternationalPhone(strPhone){
	s = stripCharsInBag(strPhone,validWorldPhoneChars);
	return (isInteger(s) && s.length >= minDigitsInIPhoneNumber);
}

/* Added by Waranis on 2009-07-02 for Risk Mitigation */
function checkUsername() {
	var username = trimAll(document.form1.inputUserName.value);
	var mobilePattern = /^[0][8][0-9]{8}$/;
	return mobilePattern.test(username);
}
/* End added by Waranis on 2009-07-02 for Risk Mitigation */

/* Added by Trithep on 2009-07-30 for Risk Mitigation */
function trimAll(sString) {
	while (sString.length > 0 && isWhitespace(sString.substring(0,1) )) {
		sString = sString.substring(1, sString.length);
	}
	while (sString.length > 0 && isWhitespace(sString.substring(sString.length-1, sString.length))) {
		sString = sString.substring(0,sString.length-1);
	}
	return sString;
}

function isWhitespace(charToCheck) {
	var whitespaceChars = " \t\n\r\f";
	return (whitespaceChars.indexOf(charToCheck) != -1);
}
/* End added by Trithep on 2009-07-30 for Risk Mitigation */

function ValidateForm(){
	var Phone=document.form1.inputUserName;
//        document.form1.inputUserName.value = trim(document.form1.inputUserName.value );
        
    if (!checkUsername()) {
		alert("ข้อมูลที่ท่านป้อนไม่สมบูรณ์ หรือไม่ถูกต้องตามรูปแบบ");
		return;
	}
	
	if (document.form1.inputPassword.value.length != 4) {
		alert("ข้อมูลที่ท่านป้อนไม่สมบูรณ์ หรือไม่ถูกต้องตามรูปแบบ");
		return;
	}
        
	document.form1.submit();
 }

function ValidateFormIfEnter(){
  var characterCode = window.event.keyCode;
  if( characterCode == 13){ //if generated character code is equal to ascii 13 (if enter key)
    ValidateForm();
    return false;
  } else {
    return true;
  }
}

function alertChgMobileNumb(){
  var format = /^[0-9]{9}$/;
   
  if(format.test(document.form1.inputUserName.value)) { 
			alert("ตั้งแต่วันที่ 1 กันยายน เป็นต้นไป รหัสผู้ใช้ 9 หลัก จะเปลี่ยนเป็น 10 หลัก โดยใส่ 08 แทน 0 ตัวหน้า \nในครั้งต่อไปกรุณาใช้รหัสผู้ใช้ 10 หลักในการใช้บริการผ่านเว็บ.");
	}

	document.form1.submit();
}
</script> 
</head>
<body>
<div id="header">
    <%@include file="head.jsp" %>
</div>

<div id="container">
	<div id="pathway"><A href="${pageContext.request.contextPath}/index.html" class="link2">Web service</A> &gt; Log In</div>
	<div id="main">
    	<div id="left-side"></div>
    	<div id="content">
        	<div class="content-middle">
            	<div class="language"><a href="javascript:void(0);" onclick="changeLanguage('th');"><img src="${RESOURCE}/eng/images/th_flag.gif" width="30" height="16" border="0" /></a></div>
                <h3><img src="${RESOURCE}/eng/images/14_webservice_head01.gif" /></h3>
                	
                
                	<table width="100%" border="0">
                      <tr>
                        <td>
						<!-- เอา Content ใส่ ระหว่างนี้ -->
						<table width="650" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td height="40" class="textnormal">Happy provides you with many convenient online services at your fingertips. Log in or signup now!</td>
                          </tr>
                          <tr>
                            <td height="15" align="center"><table width="90%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                  <td width="50%"><table width="100%" border="0" cellspacing="0" cellpadding="3">
                                            <tr> 
                                              <td width="3%"><img src="${RESOURCE}/eng/images/14_no01.gif" width="35" height="24" /></td>
                                              <td width="97%" class="textnormal_grey"><strong>Check 
                                                Your Account Balance</strong></td>
                                            </tr>
                                            <tr> 
                                              <td><img src="${RESOURCE}/eng/images/14_no02.gif" width="35" height="24"/></td>
                                              <td class="textnormal_grey"><strong>Check 
                                                Your VAS Balance</strong></td>
                                            </tr>
                                            <tr> 
                                              <td><img src="${RESOURCE}/eng/images/14_no03.gif" width="35" height="24" /></td>
                                              <td class="textnormal_grey"><strong>Refill 
                                                Using Call-Credit Refill Card</strong></td>
                                            </tr>
                                            <tr> 
                                              <td><img src="${RESOURCE}/eng/images/14_no04.gif" width="35" height="24" /></td>
                                              <td class="textnormal_grey"><strong>Refill 
                                                Using VAS Refill Card</strong></td>
                                            </tr>
                                            <tr> 
                                              <td><img src="${RESOURCE}/eng/images/14_no05.gif" width="35" height="24" /></td>
                                              <td class="textnormal_grey"><strong>Promotion 
                                                Switching</strong></td>
                                            </tr>
											<tr> 
                                              <td><img src="${RESOURCE}/eng/images/14_no06.gif" width="35" height="24" /></td>
                                              <td class="textnormal_grey"><strong>Happy Supermouth</strong></td>
                                            </tr>
											<tr> 
                                              <td><img src="${RESOURCE}/eng/images/14_no07.gif" width="35" height="24" /></td>
                                              <td class="textnormal_grey"><strong>Happy 
                                                Special Number</strong></td>
                                            </tr>
                                            <tr> 
                                              <td><img src="${RESOURCE}/eng/images/14_no08.gif" width="35" height="24" /></td>
                                              <td class="textnormal_grey"><strong>Send 
                                                50 Online SMS for FREE !</strong></td>
                                            </tr>
                                            <tr> 
                                              <td><img src="${RESOURCE}/eng/images/14_no09.gif" width="35" height="24" /></td>
                                              <td class="textnormal_grey"><strong>Day 
                                                Give-Away Service</strong></td>
                                            </tr>
                                            <tr> 
                                              <td><img src="${RESOURCE}/eng/images/14_no10.gif" width="35" height="24" /></td>
                                              <td class="textnormal_grey"><strong>Emergency 
                                                Refill Service</strong></td>
                                            </tr>
                                            <tr> 
                                              <td><img src="${RESOURCE}/eng/images/14_no11.gif" width="35" height="24" /></td>
                                              <td class="textnormal_grey"><strong>Balance 
                                                Transfer Service</strong></td>
                                            </tr>
                                            <tr> 
                                              <td><img src="${RESOURCE}/eng/images/14_no12.gif" width="35" height="24" /></td>
                                              <td class="textnormal_grey"><strong>Happy 
                                                Bank</strong></td>
                                            </tr>
                                            <tr> 
                                              <td><img src="${RESOURCE}/eng/images/14_no13.gif" width="35" height="24" /></td>
                                              <td class="textnormal_grey"><strong>No 
                                                Number No Talk </strong></td>
                                            </tr>
                                            <tr> 
                                              <td><img src="${RESOURCE}/eng/images/14_no14.gif" width="35" height="24" /></td>
                                              <td class="textnormal_grey"><strong>Itemised 
                                                Billing Service</strong></td>
                                            </tr>
                                            <tr> 
                                              <td><img src="${RESOURCE}/eng/images/14_no15.gif" width="35" height="24" /></td>
                                              <td class="textnormal_grey"><strong>Happy 
                                                Go Inter</strong></td>
                                            </tr>
                                            <tr> 
                                              <td><img src="${RESOURCE}/eng/images/14_no16.gif" width="35" height="24" /></td>
                                              <td class="textnormal_grey"><strong>VAS 
                                                UP</strong></td>
                                            </tr>
                                            <tr> 
                                              <td><img src="${RESOURCE}/eng/images/14_no17.gif" width="35" height="24" /></td>
                                              <td class="textnormal_grey"><strong>*77 
                                                service lets you always <br/>
                                                keep in touch</strong></td>
                                            </tr>
                                            <tr>
                                              <td><img src="${RESOURCE}/eng/images/14_no18.gif" width="35" height="24" /></td>
                                              <td class="textnormal_grey"><strong>call screening service</strong></td>
                                            </tr>
                                          </table></td>
                                  <form method="post" action="/bp3/bin/DpromptLogin?lang=E" name="form1">
                                    <td valign="top"><table border="0" cellspacing="0" cellpadding="0">
                                        <tr>
                                          <td width="309" height="326" align="center" valign="top" background="${RESOURCE}/eng/images/14_webservice_login.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                              <tr>
                                                <td height="110" align="center" valign="top">&nbsp;</td>
                                              </tr>
                                              <tr>
                                                <td height="65" align="center" valign="top"><input name="inputUserName" size="25" maxlength="10" class="txt_search_c04" tabindex="1" autocomplete="off" /></td>
                                              </tr>
                                              <tr>
                                                <td height="45" align="center" valign="top"><input type="password" name="inputPassword" size="25" maxlength="4" class="txt_search_c04" tabindex="2" onKeyPress="ValidateFormIfEnter();" autocomplete="off" />
                                                </td>
                                              </tr>
                                              <input type="hidden" name="lang" value="E" />
                                              <input type="hidden" name="zone" value="P" />
                                              <tr>
                                                <td align="right" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                    <tr>
                                                      <td height="16" align="left"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                          <tr>
                                                            <td width="44">&nbsp;</td>
                                                            <td><a href="${pageContext.request.contextPath}/index.html?page=ActivateCodeSSO" class="textnormal_blue" tabindex="4" >Sign Up</a></td>
                                                          </tr>
                                                          <tr>
                                                            <td width="44">&nbsp;</td>
                                                            <td><a href="${pageContext.request.contextPath}/index.html?page=ForgetPassword" class="textnormal_blue" tabindex="5" >Forgot Password</a></td>
                                                          </tr>
                                                          <tr>
                                                            <td width="44">&nbsp;</td>
                                                            <td><a href="${pageContext.request.contextPath}/index.html?page=GuestTermOfService" class="textnormal_blue" tabindex="6" >Terms & Conditions</a></td>
                                                          </tr>
                                                        </table>
                                                        <a href="#"></a> </td>
                                                      <td width="100" valign="top"><a href="#" onClick="return ValidateForm();" tabindex="3"> <img src="${RESOURCE}/eng/images/14_webservice_login_btn.gif" width="92" height="37" border="0" /> </a> </td>
                                                    </tr>
                                                </table></td>
                                              </tr>
                                              <tr>
                                                <td align="center" valign="top">&nbsp;</td>
                                              </tr>
                                          </table></td>
                                        </tr>
                                    </table></td>
                                  </form>
                                </tr>
                              </table>
                                <table width="90%" border="0" cellspacing="0" cellpadding="0">
                                  <tr>
                                    <td class="textnormal">&nbsp;</td>
                                  </tr>
                                  <tr>
                                    <td class="textnormal"><br/>
                                        <br/>
                                        <br/>
                                      This service is intended for personal use only and may not be used for commercial purposes. Legal action will be taken should the company discover any individual violating this condition.</td>
                                  </tr>
                              </table></td>
                          </tr>
                          <tr>
                            <td height="15" align="center"><br/></td>
                          </tr>
                        </table></td>
                      </tr>
                    </table>
                
                
            </div>
            <div class="content-bottom"></div>
        </div>
    </div>
</div>
<div id="footer">
<img src="${RESOURCE}/tha/images/copy_right.jpg" />
<a href="http://www.dtac.co.th" target="_blank"><img src="${RESOURCE}/tha/images/dtact_logo.jpg" border="0" /></a>
<a href="http://www.happyvirus.com" target="_blank"><img src="${RESOURCE}/tha/images/virus_icon.jpg" border="0" /></a>
</div>
</body>
</html>
